package bos.web.interceptor;

import org.apache.struts2.ServletActionContext;

import bos.domain.User;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;





public class BOSIntercertor extends MethodFilterInterceptor{

	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		User user=(User) ServletActionContext.getRequest().getSession()
				.getAttribute("loginUser");
		if(user==null)
			return "login";
		
		
		return invocation.invoke();
	}


}
